package com.sansan.qiangji.service.impl.base;

import com.sansan.qiangji.VO.board.ShelveUseRateVO;
import com.sansan.qiangji.entity.base.Shelve;
import com.sansan.qiangji.entity.base.example.ShelveExample;
import com.sansan.qiangji.form.base.ShelveListForm;
import com.sansan.qiangji.mapper.base.ShelveMapper;
import com.sansan.qiangji.service.inter.base.ShelveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShelveServiceImpl implements ShelveService {
    @Autowired
    private ShelveMapper shelveMapper;

    @Override
    public List<Shelve> findAllShelve() {
        return shelveMapper.findAllShelve();
    }

    @Override
    public long countByExample(ShelveExample example) {
        return shelveMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(ShelveExample example) {
        return shelveMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer shelveId) {
        return shelveMapper.deleteByPrimaryKey(shelveId);
    }

    @Override
    public int insert(Shelve record) {
        return shelveMapper.insert(record);
    }

    @Override
    public int insertSelective(Shelve record) {
        return shelveMapper.insertSelective(record);
    }

    @Override
    public List<Shelve> selectByExample(ShelveExample example) {
        return shelveMapper.selectByExample(example);
    }

    @Override
    public Shelve selectByPrimaryKey(Integer shelveId) {
        return shelveMapper.selectByPrimaryKey(shelveId);
    }

    @Override
    public int updateByExampleSelective(Shelve record, ShelveExample example) {
        return shelveMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Shelve record, ShelveExample example) {
        return updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Shelve record) {
        return updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Shelve record) {
        return shelveMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<ShelveUseRateVO> shelveStockUseRate(ShelveListForm shelveListForm) {
        return shelveMapper.shelveStockUseRate(shelveListForm);
    }
}
